<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.jframe.sys.utils.StringUtil"%>
<%
	String contextPath = request.getContextPath();
	String tabId = request.getParameter("tabId_");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>功能管理</title>
<jsp:include page="/inc/inc.jsp" />
<script type="text/javascript" src="jframe/cfg/list/js/funList.js"></script>
<script type="text/javascript">
var contextPath = '<%=contextPath%>';
$(function(){
	<%=(String) request.getAttribute("js")%>
	/* var loadMtree = function(){
		makeTree(action+'.do?method=makeIndexTree','mtree',function(event,treeId,node){
			vo=[];
			vo.push({name:'upId',type:'int',logic:'and',operators:'=',value:node.id});	
			$('#grid').datagrid('load',{
			       conditions: obj2json(vo),
			});
		});
	};	
	 */	
	
	var loadMtree = function(){
		var setting = {
			data: {
				key:{
					name:"text"
				},
				simpleData: {
					enable: true,
					idKey: "id",
					pIdKey: "pId",
					rootPId: 0
				}
			},
			async: {
				type: "post",
				enable: true,
				url: action+'.do?method=getIframes&tabId_='+tabId_,
				otherParam : {}
			},
			callback : {
				onClick : function(event, treeId, node) {
					vo = [];
					vo.push({
						name : 'iframeId',
						type : 'int',
						logic : 'and',
						operators : '=',
						value : node.id
					});
					$('#grid').datagrid('load', {
						conditions : obj2json(vo)
					});
				}
			}
		};
		$.fn.zTree.init($("#mtree"), setting);//初始化树对象a
	};
	loadMtree();
});
</script>
</head>
<body class="easyui-layout">
	<div region="west" border="true" title="叶签" class="cs-west"
		style="width: 180px; height: 100%" border="false">
		<ul id="mtree" class='ztree'></ul>
	</div>
	<div region="center" border="true" border="false" style="height: 100%">
		<div id="tb">
			<a class="easyui-linkbutton" iconCls="icon-add" plain="true"
				onclick="add()">新增</a> <a class="easyui-linkbutton"
				iconCls="icon-edit" plain="true" onclick="edit()">编辑</a> <a
				class="easyui-linkbutton" iconCls="icon-remove" plain="true"
				onclick="del()">删除</a> <br><span>名称：</span><input id="text" name="text"
				type="text" style="width: 100px;"><a class="easyui-linkbutton"
				plain="true" onclick="find()" iconCls="icon-search">查询</a>
		</div>
		<table id="grid" toolbar="#tb" border="0"></table>
	</div>
</body>
</html>